<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.prime.com.tr/ui"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	template="/templates/crud-template.xhtml">

<ui:define name="content">
<div align="left">

  <h:form style="width: 400px; ">  
      
        <p:ajaxStatus style="height:24px;display:block;">  
            <f:facet name="start" >  
                   <h:graphicImage value="../design/ajaxloading.gif" />  
            </f:facet>  
          
            <f:facet name="complete">  
                <h:outputText value="" />  
            </f:facet>  
        </p:ajaxStatus>  
          
        <p:growl id="messages" showDetail="true" />  
      
        <p:schedule value="#{scheduleController.eventModel}"  
                    editable="true" widgetVar="myschedule"
                    eventSelectListener="#{scheduleController.onEventSelect}"
                    dateSelectListener="#{scheduleController.onDateSelect}" 
                    eventMoveListener="#{scheduleController.onEventMove}" 
                    eventResizeListener="#{scheduleController.onEventResize}"  
                    onEventMoveUpdate="messages" onEventResizeUpdate="messages"  
                   
                onEventSelectUpdate="eventDetails" onEventSelectComplete="eventDialog.show()"> 
        </p:schedule>  
      

  
      <p:dialog widgetVar="eventDialog" header="Liberar Cita" 
      showEffect="clip" hideEffect="explode" resizable="false"  width="400"> 
 
            <h:panelGrid id="eventDetails" columns="2">  
            <h:outputLabel for="codc" value="Cita :" />  
            <p:inputText id="codc" value="#{scheduleController.event.codCita}" disabled="true"/> 
            <h:outputLabel for="cod" value="Codigo :"  />  
            <p:inputText id="cod" value="#{scheduleController.event.codAlu}" disabled="true" /> 
            <h:outputLabel for="title" value="Alumno :"  />  
            <p:inputText id="title" value="#{scheduleController.event.title}" disabled="true" /> 
           
            <h:outputLabel for="from" value="FechaRegistro:" />  
            <p:inputMask id="from" mask="99/99/9999"  
                value="#{scheduleController.event.fecReg}" disabled="true">  
                <f:convertDateTime pattern="dd/MM/yyyy" />  
            </p:inputMask>  
            <h:outputLabel for="estado" value="Estado :" />  
            <p:inputText id="estado" value="#{scheduleController.event.stado}" disabled="true" /> 
            <h:outputLabel for="obser" value="Observacion :"/>  
            
            <p:inputTextarea style="font-weight:bold;width:200px;height:100px;" value="#{scheduleController.event.observacion}" effectDuration="300" />
           
            
            <p:commandButton  value="Liberar"  
                    oncomplete="myschedule.update();eventDialog.hide()"  
                    actionListener="#{scheduleController.addEvent}" 
                    dateSelectListener="#{scheduleController.onDateSelect}" 
                    eventMoveListener="#{scheduleController.onEventMove}" 
                    onEventMoveUpdate="messages" onEventResizeUpdate="messages"
                    onDateSelectUpdate="eventDetails" onDateSelectComplete="eventDialog.show()"  
                    onEventSelectUpdate="eventDetails" onEventSelectComplete="eventDialog.show()"/>  
            <p:commandButton type="button" value="Cancelar" 
                    onclick="eventDialog.hide()"/> 
                
                 
            </h:panelGrid> 
   
       </p:dialog>  
          
             
    </h:form>  



</div>
   
</ui:define>

</ui:composition>